﻿<Window x:Class="Pomo.SettingsWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Options" Height="300" Width="300">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="120*" />
            <ColumnDefinition Width="158*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <Border VerticalAlignment="Center" Grid.Column="0" Grid.Row="0" >
            <TextBlock Margin="10" HorizontalAlignment="Right">Duration:</TextBlock>
        </Border>
        <Border VerticalAlignment="Center" Grid.Column="0" Grid.Row="1">
            <TextBlock Margin="10" HorizontalAlignment="Right">Break Duration:</TextBlock>
        </Border>
        <Border VerticalAlignment="Center" Grid.Column="0" Grid.Row="2">
            <TextBlock Margin="10" TextWrapping="Wrap"  HorizontalAlignment="Right">Alert at End of Work:</TextBlock>
        </Border>
        <Border VerticalAlignment="Center" Grid.Column="0" Grid.Row="3">
            <TextBlock Margin="10" TextWrapping="Wrap"  HorizontalAlignment="Right">Alert at End of Break:</TextBlock>
        </Border>
        <StackPanel Grid.Column="1" VerticalAlignment="Center" Orientation="Horizontal">
            <Slider x:Name="durationSlider" Height="24" Width="100" Interval="1" Value="{Binding Source={StaticResource settings}, Path=Default.PomodoroDuration}" Minimum="1" Maximum="90" />
            <TextBlock Text="{Binding ElementName=durationSlider, Path=Value}" TextAlignment="Center" FontSize="16" Width="30" VerticalAlignment="Center" />
        </StackPanel>
        <StackPanel Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" Orientation="Horizontal">
            <Slider x:Name="breakDurationSlider" Focusable="False" Height="24" Width="100" Grid.Column="1" Grid.Row="1" Interval="1" Value="{Binding Source={StaticResource settings}, Path=Default.BreakDuration}" Minimum="0" Maximum="15" />
            <TextBlock Text="{Binding ElementName=breakDurationSlider, Path=Value}" TextAlignment="Center" FontSize="16" Width="30" VerticalAlignment="Center" />
        </StackPanel>
        <CheckBox x:Name="alertAtEndOfWorkCheckBox" Grid.Row="2" Grid.Column="1" VerticalAlignment="Center" IsChecked="{Binding Source={StaticResource settings}, Path=Default.AlertAtEndOfWork}" />
        <CheckBox x:Name="alertAtEndOfBreakCheckBox" Grid.Row="3" Grid.Column="1" VerticalAlignment="Center" IsChecked="{Binding Source={StaticResource settings}, Path=Default.AlertAtEndOfBreak}" />
        <Button Content="Save" Grid.Column="1" Grid.Row="6" Height="23" Name="saveButton" VerticalAlignment="Center" Width="75" Click="saveButton_Click" />
    </Grid>
</Window>
